<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>仪表盘 - Python Web开发学习</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap/5.1.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container">
            <a class="navbar-brand" href="{{ url_for('index') }}">Python Web</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto">
                    <li class="nav-item">
                        <a class="nav-link active" href="{{ url_for('dashboard') }}">仪表盘</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('logout') }}">登出</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <div class="container mt-5">
        <div class="row justify-content-center">
            <div class="col-md-8">
                <div class="card">
                    <div class="card-header">
                        <h4 class="mb-0">欢迎回来，{{ current_user.username }}！</h4>
                    </div>
                    <div class="card-body">
                        <h5 class="card-title">用户信息</h5>
                        <p class="card-text">用户名：{{ current_user.username }}</p>
                        <p class="card-text">用户ID：{{ current_user.id }}</p>
                        <hr>
                        <h5 class="card-title">功能区</h5>
                        <div class="d-grid gap-2">
                            <a href="#" class="btn btn-primary">个人资料设置</a>
                            <a href="#" class="btn btn-info">消息中心</a>
                            <a href="{{ url_for('logout') }}" class="btn btn-danger">退出登录</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
</body>
</html>